<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="css/mystyle.css"/>
		<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-default/index.css" />
	</head>

	<body>
		<div id="app">
			<el-menu theme="dark"  default-active="1" class="el-menu-demo" mode="horizontal" @select="handleSelect" >
				<el-menu-item index="1" ><router-link to="/question" class="nav-link">处理中心</router-link></el-menu-item>
				<el-submenu index="2">
					<template slot="title">我的工作台</template>
					<el-menu-item index="2-1">选项1</el-menu-item>
					<el-menu-item index="2-2">选项2</el-menu-item>
					<el-menu-item index="2-3">选项3</el-menu-item>
				</el-submenu>
				<el-menu-item index="3">
					<a href="https://www.ele.me" target="_blank">订单管理</a>
				</el-menu-item>
			</el-menu>
 		    <router-view></router-view>			 
		</div>
	</body>
	<!-- 先引入 Vue -->
	<script src="https://unpkg.com/vue/dist/vue.js"></script>
	<!-- 引入组件库 -->
	<script type="text/javascript" src="js/router.js" ></script>
	<script src="https://unpkg.com/element-ui/lib/index.js"></script>
	<script src="http://code.highcharts.com/highcharts.js"></script>
	<script type="text/javascript">
		new Vue({
			el: '#app',
			data: function() {
				return {
					visible: false
				}
			},
			methods: {
 				handleSelect(key, keyPath) {
        			console.log(key, keyPath);
      			}
 			}
 			
		})
  		const User = {
  			template: `<div>User {{ $route.params.id }}</div>`
		}

const router = new VueRouter({
  routes: [
    { path: '/user/:id', component: User }
  ]
})

const app = new Vue({ router }).$mount('#app') 
	</script>

</html>